home *** CD-ROM | disk | FTP | other *** search
/ Experimental BBS Explossion 3 / Experimental BBS Explossion III.iso / c / pcw.zip / VCLS.C < prev    next >
Text File  |  1990-04-27  |  2KB  |  39 lines

  1. /***********************************************************/
  2. /* File Id.                  Vcls.C                        */
  3. /* Author.                   Stan Milam.                   */
  4. /* Date Written.             11/19/88.                     */
  5. /* Date Last Modified.                                     */
  6. /*                                                         */
  7. /*          (c) Copyright 1989-90 by Stan Milam            */
  8. /*                                                         */
  9. /* Comments:  This routine will clear the text screen via  */
  10. /* ROM BIOS.  It will call getvmode, which also calls ROM  */
  11. /* BIOS, to make sure we are in text mode before clearing  */
  12. /* the screen.  getvmode() will also tell us how wide the  */
  13. /* text screen is.  If we are not in a text mode then      */
  14. /* nothing will happen and the function will return NULL.  */
  15. /* However, if the screen is in text mode it will be       */
  16. /* and the function will return 1.                         */
  17. /***********************************************************/
  18.  
  19. #include <dos.h>
  20. #include "pcwproto.h"
  21.  
  22. #define NULL 0
  23.  
  24. void vcls(void)  {
  25.  
  26.     union REGS regs;
  27.     int   mx_rows, mx_cols;
  28.  
  29.     if (chk_video_state(&mx_rows, &mx_cols)) {
  30.        regs.x.ax = 0x600;                  /* Scroll up entire window */
  31.        regs.x.bx = 0x0700;                 /* Light grey on Black */
  32.        regs.x.cx = 0;                      /* Upper corner */
  33.        regs.h.dh = (char) (mx_rows - 1);   /* Bottom row */
  34.        regs.h.dl = (char) (mx_cols - 1);   /* Right most column */
  35.        int86(0x10,®s,®s);            /* Call BIOS to clear screen */
  36.        set_cursor_pos(1,1);                /* Locate cursor at home pos */
  37.     }
  38. }
  39.